package com.ssm.zhihu_ssm.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.*;
import java.util.Date;


@Data
public class Comment {

    private int id;//id 主键
    private int aID;//对应文章（问题）的id
    private int uID;//用户的id
    private String content;//评论内容
    private int goodNum;//点赞数
    private int fromID;//发送给谁的id

    @CreatedDate
    @JsonFormat(pattern="yyyy-MM-dd hh:mm:ss")
    private Date time;//评论时间

    private int state;//回复问题状态为1，回复评论的状态是0
}
